package com.etcsoft.pagedesigner.page;

import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

import com.etcsoft.pagedesigner.PageDesignerPlugin;
import com.etcsoft.pagedesigner.common.Constants;
import com.etcsoft.pagedesigner.common.Messages;

/**
 * @author korman21@gmail.com
 */
public class SvnPreferencePage extends FieldEditorPreferencePage implements
        IWorkbenchPreferencePage {

    @Override
    public void init(IWorkbench workbench) {
        this.setPreferenceStore(PageDesignerPlugin.getDefault().getPreferenceStore());
        this.noDefaultAndApplyButton();
    }

    @Override
    protected void createFieldEditors() {
        this.addField(new StringFieldEditor(Constants.PREF_SVN_URL,
                Messages.DESC_PROP_SVN_URL_LABEL, this.getFieldEditorParent()));
        this.addField(new StringFieldEditor(Constants.PREF_SVN_ID,
                Messages.DESC_PROP_SVN_ID_LABEL, this.getFieldEditorParent()));
        this.addField(new StringFieldEditor(Constants.PREF_SVN_PWD,
                Messages.DESC_PROP_SVN_PWD_LABEL, this.getFieldEditorParent()));
    }
}
